using System;
using System.Collections.Generic;
using System.Text;

namespace Pixels.DataLayer
{
    internal class DBConstants
    {
        #region ContentType
        public static readonly string ContentTypeDelete = "ContentTypeDelete";
        public static readonly string ContentTypesFetch = "ContentTypesFetch";
        public static readonly string ContentTypeFetchByID = "ContentTypeFetchByID";
        public static readonly string ContentTypeFetchByListID = "ContentTypeFetchByListID";
        public static readonly string ContentTypeFetchByName = "ContentTypeFetchByName";
        public static readonly string ContentTypeFetchByContentTypeItemID = "ContentTypeFetchByContentTypeItemID";
        #endregion

        #region ContentTypeItem
        public static readonly string ContentTypeItemDelete = "ContentTypeItemDelete";
        public static readonly string ContentTypeItemsFetch = "ContentTypeItemsFetch";
        public static readonly string ContentTypeItemFetchByID = "ContentTypeItemFetchByID";
        public static readonly string ContentTypeItemFetchByExtentedListItemID = "ContentTypeItemFetchByExtentedListItemID";
        public static readonly string ContentTypeItemsFetchByContentTypeID = "ContentTypeItemsFetchByContentTypeID";
        public static readonly string ContentTypeItemsFetchByContentTypeID_ItemName = "ContentTypeItemsFetchByContentTypeID_ItemName";
        #endregion

        #region ListItem
        public static readonly string ListItemDelete = "ListItemDelete";
        public static readonly string ListItemsFetch = "ListItemsFetch";
        public static readonly string ListItemFetchByID = "ListItemFetchByID";
        public static readonly string ListItemFetchByExtentedListItemID = "ListItemFetchByExtentedListItemID";
        public static readonly string ListItemFetchByQuery = "ListItemsFetchByQuery";
        #endregion

        #region ExtendListItem
        public static readonly string ExtentedListItemDelete = "ExtentedListItemDelete";
        public static readonly string ExtentedListItemsFetch = "ExtentedListItemsFetch";
        public static readonly string ExtentedListItemFetchByID = "ExtentedListItemFetchByID";        
        public static readonly string ExtentedListItemsFetchByListItemID = "ExtentedListItemsFetchByListItemID";
        public static readonly string ExtentedListItemsFetchByContentTypeItemID = "ExtentedListItemsFetchByContentTypeItemID";
        public static readonly string ExtentedListItemFetchByItemName_ListItemID_ContentTypeItemID = "ExtentedListItemFetchByItemName_ListItemID_ContentTypeItemID";
        public static readonly string ExtentedListItemFetchByItemName = "ExtentedListItemFetchByItemName";
        #endregion

        //#region ContentType
        //public static readonly string ContentTypeDelete = "DELETE FROM ContentType WHERE ContentTypeID = '{0}'";
        //public static readonly string ContentTypesFetch = "SELECT ContentTypeID, Title, Description, CreatedDate, ModifiedDate, BaseContentTypeID FROM ContentType";
        //public static readonly string ContentTypeFetchByID = "SELECT ContentTypeID, Title, Description, CreatedDate, ModifiedDate, BaseContentTypeID FROM ContentType WHERE ContentTypeID = '{0}'";
        //public static readonly string ContentTypeFetchByListID = "SELECT ct.ContentTypeID, ct.Title, ct.Description, ct.CreatedDate, ct.ModifiedDate, ct.BaseContentTypeID FROM ContentType ct,List list WHERE ct.ContentTypeID = list.ContentTypeID AND list.ListID = '{0}'";
        //public static readonly string ContentTypeFetchByName = "SELECT ContentTypeID, Title, Description, CreatedDate, ModifiedDate, BaseContentTypeID FROM ContentType WHERE Title = '{0}'";
        //public static readonly string ContentTypeFetchByContentTypeItemID = "SELECT ContentTypeID, Title, Description, CreatedDate, ModifiedDate, BaseContentTypeID FROM ContentType WHERE ContentTypeID = (SELECT TOP 1 ContentTypeID FROM ContentTypeItem WHERE ContentTypeItemID = '{0}')";
        //#endregion

        //#region ContentTypeItem        
        //public static readonly string ContentTypeItemDelete = "DELETE FROM ContentTypeItem WHERE ContentTypeItemID = '{0}";
        //public static readonly string ContentTypeItemsFetch = "SELECT ContentTypeItemID, ItemName, DisplayName, Type, Size, DefaultValue, BaseContentTypeItemID, ContentTypeID FROM ContentTypeItem";
        //public static readonly string ContentTypeItemFetchByID = "SELECT ContentTypeItemID, ItemName, DisplayName, Type, Size, DefaultValue, BaseContentTypeItemID, ContentTypeID FROM ContentTypeItem WHERE ContentTypeItemID = '{0}'";
        //public static readonly string ContentTypeItemFetchByExtentedListItemID = "SELECT ContentTypeItemID, DisplayName, ItemName, Type, Size, DefaultValue, BaseContentTypeItemID, ContentTypeID FROM ContentTypeItem WHERE ContentTypeItemID = (SELECT TOP 1 ContentTypeItemID FROM ExtentedListItem WHERE ExtentedListItemID = '{0}')";
        //public static readonly string ContentTypeItemsFetchByContentTypeID = "SELECT ContentTypeItemID, ItemName, DisplayName, Type, Size, DefaultValue, BaseContentTypeItemID, ContentTypeID FROM ContentTypeItem WHERE ContentTypeID = '{0}'";
        //public static readonly string ContentTypeItemsFetchByContentTypeIDAndItemName = "SELECT ContentTypeItemID, ItemName, DisplayName, Type, Size, DefaultValue, BaseContentTypeItemID, ContentTypeID FROM ContentTypeItem  WHERE ContentTypeID = '{0}' And ItemName = '{1}'";
        //#endregion

        //#region List
        //public static readonly string ListDelete = "DELETE FROM List WHERE ListID = '{0}'";
        //public static readonly string ListsFetch = "SELECT ListID, Title, Description, CreatedDate, ModifiedDate, ContentTypeID FROM List";
        //public static readonly string ListFetchByID = "SELECT ListID, Title, Description, CreatedDate, ModifiedDate, ContentTypeID FROM List WHERE ListID = '{0}'";
        //public static readonly string ListFetchByName = "SELECT ListID, Title, Description, CreatedDate, ModifiedDate, ContentTypeID FROM List WHERE Title = '{0}'";
        //public static readonly string ListFetchByListItemID = "SELECT ListID, Title, Description, CreatedDate, ModifiedDate, ContentTypeID FROM List WHERE ListID = (SELECT TOP 1 ListID FROM ListItem Where ListItemID = '{0}')";
        //public static readonly string ListFetchByExtentedListItemID = "SELECT ListID, Title, Description, CreatedDate, ModifiedDate, ContentTypeID FROM List WHERE ListID = (SELECT TOP 1 ListID FROM ExtentedListItem Where ExtentedListItemID = '{0}')";
        //public static readonly string ListFetchByContentTypeID = "SELECT ListID, Title, Description, CreatedDate, ModifiedDate, ContentTypeID FROM List WHERE ContentTypeID = '{0}'";
        //#endregion

        //#region ListItem
        //public static readonly string ListItemDelete = "DELETE FROM ListItem Where ListItemID = '{0}'";
        //public static readonly string ListItemsFetch = "SELECT ListItemID, Title, Description, CreatedDate, ModifiedDate, ListID, BaseListItemID FROM ListItem";
        //public static readonly string ListItemFetchByID = "SELECT ListItemID, Title, Description, CreatedDate, ModifiedDate, ListID, BaseListItemID FROM ListItem Where ListItemID = '{0}'";
        //public static readonly string ListItemFetchByExtentedListItemID = "SELECT ListItemID, Title, Description, CreatedDate, ModifiedDate, ListID, BaseListItemID FROM ListItem Where ListItemID = (SELECT TOP 1 ListItemID FROM ExtentedListItem WHERE ExtentedListItemID = '{0}')";
        //public static readonly string ListItemsFetchByListID = "SELECT ListItemID, Title, Description, CreatedDate, ModifiedDate, ListID, BaseListItemID FROM ListItem Where ListID = '{0}'";
        //public static readonly string ListItemsFetchByListName = "SELECT lt.ListItemID, lt.Title, lt.Description, lt.CreatedDate, lt.ModifiedDate, lt.ListID, lt.BaseListItemID FROM ListItem lt, List list Where list.ListID = lt.ListID AND list.Title = '{0}'";
        //public static readonly string ListItemFetchByListNameListItemID = "SELECT TOP 1 lt.ListItemID, lt.Title, lt.Description, lt.CreatedDate, lt.ModifiedDate, lt.ListID, lt.BaseListItemID, elt.ExtentedListItemID, elt.ItemName, elt.Value, elt.ContentTypeItemID " +
        //     "FROM ListItem lt, List list,ExtentedListItem elt Where list.ListID = lt.ListID AND elt.ListID = lt.ListID AND elt.ListItemID = lt.ListItemID AND list.Title = '{0}' AND lt.ListItemID = '{1}'";
        //#endregion

        //#region ExtendListItem
        //public static readonly string ExtentedListItemDelete = "DELETE FROM ExtentedListItem WHERE ExtentedListItemID = '{0}'";
        //public static readonly string ExtentedListItemsFetch = "SELECT ExtentedListItemID, ItemName, Value, ListID, ListItemID, ContentTypeItemID FROM ExtentedListItem";
        //public static readonly string ExtentedListItemFetchByID = "SELECT ExtentedListItemID, ItemName, Value, ListID, ListItemID, ContentTypeItemID FROM ExtentedListItem WHERE ExtentedListItemID = '{0}'";
        //public static readonly string ExtentedListItemsFetchByListID = "SELECT ExtentedListItemID, ItemName, Value, ListID, ListItemID, ContentTypeItemID FROM ExtentedListItem WHERE ListID = '{0}'";
        //public static readonly string ExtentedListItemsFetchByListItemID = "SELECT ExtentedListItemID, ItemName, Value, ListID, ListItemID, ContentTypeItemID FROM ExtentedListItem WHERE ListItemID = '{0}'";
        //public static readonly string ExtentedListItemsFetchByContentTypeItemID = "SELECT ExtentedListItemID, ItemName, Value, ListID, ListItemID, ContentTypeItemID FROM ExtentedListItem WHERE ContentTypeItemID = '{0}'";
        //#endregion
    }
}
